﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;
using BCDto.Trading.SaleGoods.SaleGoodsNorm;

namespace BCDto.Trading.SaleGoods.SaleGoods
{
    /// <summary>
    /// 销售商品
    /// </summary>
    public class SaleGoodsRequestDto
    {
        /// <summary>
        /// 销售商品分类Id
        /// </summary>		
        [Display(Name = "销售商品分类Id")]
        [Required(ErrorMessage = "{0} 不应为空")]
        public int SaleGoodsCategoryId { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>		
        [Display(Name = "商品名称")]
        [Required(ErrorMessage = "{0} 不应为空")]
        [StringLength(50, MinimumLength = 6, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
        public string GoodsName { get; set; }
        /// <summary>
        /// 商品唯一码
        /// </summary>		
        [Display(Name = "商品唯一码")]
        [Required(ErrorMessage = "{0} 不应为空")]
        [StringLength(50, MinimumLength = 6, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
        public string Sku { get; set; }
        /// <summary>
        /// 商品关键字
        /// </summary>		
        [Display(Name = "商品关键字")]
        [Required(ErrorMessage = "{0} 不应为空")]
        [StringLength(200, MinimumLength = 1, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
        public string Keyword { get; set; }
        /// <summary>
        /// 规格列表
        /// </summary>		
        [Display(Name = "规格列表")]
        [Required(ErrorMessage = "{0} 不应为空")]
        public List<SaleGoodsNormRequestDto> Norms { get; set; }
    }
}

